package cn.jiyun.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Fay
 * @date 2022/6/20&16:07
 */
@RestController
public class HelloController {
    @Value("${user.username}")
    private String username;

    @Value("${user.age}")
    private String age;

    @Value("${user.password}")
    private String password;

    @GetMapping("/hello")
    public Map<String,Object> hello(){
        HashMap<String,Object> map = new HashMap();
        map.put("username",username);
        map.put("age",age);
        map.put("password",password);
        return map;
    }
}
